package lab2;

import java.util.Random;
import java.util.Scanner;

public class 第五题 {
    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
//        int x = sc.nextInt();
//        int y = sc.nextInt();
        for (int i = 0; i < 20; i++) {
            int x = -5 + new Random().nextInt(10);
            int y = -5 + new Random().nextInt(10);
            int Mr;
            if (x > 0 && y > 0) {
                System.out.print("1-true ");
                Mr = x + y + 10;
            } else {
                System.out.print("1-false ");
                Mr = x + y - 10;
            }
            if (Mr < 0) {
                System.out.print("2-true ");
                Mr = 0;
            } else {
                System.out.print("2-false ");
            }
            System.out.printf("第%d次测试:x=%d,y=%d,Mr=%d\n",(i + 1), x, y, Mr);
        }

    }
}
